﻿using Common.Device.Enums;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Device.ViewModels
{
    public  class GeChaoJiCheViewModel : BindableBase
    {
        private int menuIndex = 0;
        /// <summary>
        /// 菜单索引
        /// </summary>
        public int MenuIndex
        {
            get { return menuIndex; }
            set { SetProperty(ref menuIndex, value); }
        }
        private ObservableCollection<int> iniChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 初始化通道
        /// </summary>
        public ObservableCollection<int> IniChannels
        {
            get { return iniChannels; }
            set { SetProperty(ref iniChannels, value); }
        }
        private int iniChannel = 1;
        /// <summary>
        /// 初始化通道
        /// </summary>
        public int IniChannel
        {
            get { return iniChannel; }
            set { SetProperty(ref iniChannel, value); }
        }

        private ObservableCollection<int> tmodeChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 测试模式通道
        /// </summary>
        public ObservableCollection<int> TmodeChannels
        {
            get { return tmodeChannels; }
            set { SetProperty(ref tmodeChannels, value); }
        }
        private int tmodeChannel = 1;
        /// <summary>
        /// 测试模式通道
        /// </summary>
        public int TmodeChannel
        {
            get { return tmodeChannel; }
            set { SetProperty(ref tmodeChannel, value); }
        }

        private ObservableCollection<int> rparaChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 读参数通道
        /// </summary>
        public ObservableCollection<int> RparaChannels
        {
            get { return rparaChannels; }
            set { SetProperty(ref rparaChannels, value); }
        }
        private int rparaChannel = 1;
        /// <summary>
        /// 读参数通道
        /// </summary>
        public int RparaChannel
        {
            get { return rparaChannel; }
            set { SetProperty(ref rparaChannel, value); }
        }
        private string rparaVMin;
        /// <summary>
        /// 电压下限
        /// </summary>
        public string RparaVMin
        {
            get { return rparaVMin; }
            set { SetProperty(ref rparaVMin, value); }
        }
        private string rparaVMax;
        /// <summary>
        /// 电压上限
        /// </summary>
        public string RparaVMax
        {
            get { return rparaVMax; }
            set { SetProperty(ref rparaVMax, value); }
        }
        private string rparaCMin;
        /// <summary>
        /// 温度下限
        /// </summary>
        public string RparaCMin
        {
            get { return rparaCMin; }
            set { SetProperty(ref rparaCMin, value); }
        }
        private string rparaCMax;
        /// <summary>
        /// 温度上限
        /// </summary>
        public string RparaCMax
        {
            get { return rparaCMax; }
            set { SetProperty(ref rparaCMax, value); }
        }

        private ObservableCollection<int> rportChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 读端口通道
        /// </summary>
        public ObservableCollection<int> RportChannels
        {
            get { return rportChannels; }
            set { SetProperty(ref rportChannels, value); }
        }
        private int rportChannel = 1;
        /// <summary>
        /// 读端口通道
        /// </summary>
        public int RportChannel
        {
            get { return rportChannel; }
            set { SetProperty(ref rportChannel, value); }
        }
        private List<string> rportTemps = Enum.GetNames(typeof(GeChaoJiEnum.DianPinMode)).ToList();
        /// <summary>
        /// 电平
        /// </summary>
        public List<string> RportTemps
        {
            get { return rportTemps; }
            set { SetProperty(ref rportTemps, value); }
        }
        private string rportTemp = GeChaoJiEnum.DianPinMode.低电平.ToString();
        /// <summary>
        /// 电平
        /// </summary>
        public string RportTemp
        {
            get { return rportTemp; }
            set { SetProperty(ref rportTemp, value); }
        }

        private ObservableCollection<int> tportChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 测试通讯端口
        /// </summary>
        public ObservableCollection<int> TportChannels
        {
            get { return tportChannels; }
            set { SetProperty(ref tportChannels, value); }
        }
        private int tportChannel = 1;
        /// <summary>
        /// 测试通讯端口
        /// </summary>
        public int TportChannel
        {
            get { return tportChannel; }
            set { SetProperty(ref tportChannel, value); }
        }

        private ObservableCollection<int> tliftChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 测试升降电机端口
        /// </summary>
        public ObservableCollection<int> TliftChannels
        {
            get { return tliftChannels; }
            set { SetProperty(ref tliftChannels, value); }
        }
        private int tliftChannel = 1;
        /// <summary>
        /// 测试升降电机端口
        /// </summary>
        public int TliftChannel
        {
            get { return tliftChannel; }
            set { SetProperty(ref tliftChannel, value); }
        }
        private List<string> tliftTemps = Enum.GetNames(typeof(GeChaoJiEnum.DianJiMode)).ToList();
        /// <summary>
        /// 动作类型
        /// </summary>
        public List<string> TliftTemps
        {
            get { return tliftTemps; }
            set { SetProperty(ref tliftTemps, value); }
        }
        private string tliftTemp = GeChaoJiEnum.DianJiMode.停止.ToString();
        /// <summary>
        /// 动作类型
        /// </summary>
        public string TliftTemp
        {
            get { return tliftTemp; }
            set { SetProperty(ref tliftTemp, value); }
        }

        private ObservableCollection<int> twalkChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 测试行走电机端口
        /// </summary>
        public ObservableCollection<int> TwalkChannels
        {
            get { return twalkChannels; }
            set { SetProperty(ref twalkChannels, value); }
        }
        private int twalkChannel = 1;
        /// <summary>
        /// 测试行走电机端口
        /// </summary>
        public int TwalkChannel
        {
            get { return twalkChannel; }
            set { SetProperty(ref twalkChannel, value); }
        }
        private List<string> twalkTemps = Enum.GetNames(typeof(GeChaoJiEnum.DianJiMode)).ToList();
        /// <summary>
        /// 动作类型
        /// </summary>
        public List<string> TwalkTemps
        {
            get { return twalkTemps; }
            set { SetProperty(ref twalkTemps, value); }
        }
        private string twalkTemp = GeChaoJiEnum.DianJiMode.停止.ToString();
        /// <summary>
        /// 动作类型
        /// </summary>
        public string TwalkTemp
        {
            get { return twalkTemp; }
            set { SetProperty(ref twalkTemp, value); }
        }
        private string twalkLMin;
        /// <summary>
        /// 左轮转速下限
        /// </summary>
        public string TwalkLMin
        {
            get { return twalkLMin; }
            set { SetProperty(ref twalkLMin, value); }
        }
        private string twalkLMax;
        /// <summary>
        /// 左轮转速上限
        /// </summary>
        public string TwalkLMax
        {
            get { return twalkLMax; }
            set { SetProperty(ref twalkLMax, value); }
        }

        private string twalkRMin;
        /// <summary>
        /// 右轮转速下限
        /// </summary>
        public string TwalkRMin
        {
            get { return twalkRMin; }
            set { SetProperty(ref twalkRMin, value); }
        }
        private string twalkRMax;
        /// <summary>
        /// 右轮转速上限
        /// </summary>
        public string TwalkRMax
        {
            get { return twalkRMax; }
            set { SetProperty(ref twalkRMax, value); }
        }

        private ObservableCollection<int> tmowChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 测试行走电机端口
        /// </summary>
        public ObservableCollection<int> TmowChannels
        {
            get { return tmowChannels; }
            set { SetProperty(ref tmowChannels, value); }
        }
        private int tmowChannel = 1;
        /// <summary>
        /// 测试行走电机端口
        /// </summary>
        public int TmowChannel
        {
            get { return tmowChannel; }
            set { SetProperty(ref tmowChannel, value); }
        }
        private List<string> tmowTemps = Enum.GetNames(typeof(GeChaoJiEnum.DianJiMode)).ToList();
        /// <summary>
        /// 动作类型
        /// </summary>
        public List<string> TmowTemps
        {
            get { return tmowTemps; }
            set { SetProperty(ref tmowTemps, value); }
        }
        private string tmowTemp = GeChaoJiEnum.DianJiMode.停止.ToString();
        /// <summary>
        /// 动作类型
        /// </summary>
        public string TmowTemp
        {
            get { return tmowTemp; }
            set { SetProperty(ref tmowTemp, value); }
        }
        private string tmowMin;
        /// <summary>
        /// 电机转速下限
        /// </summary>
        public string TmowMin
        {
            get { return tmowMin; }
            set { SetProperty(ref tmowMin, value); }
        }
        private string tmowMax;
        /// <summary>
        /// 电机转速上限
        /// </summary>
        public string TmowMax
        {
            get { return tmowMax; }
            set { SetProperty(ref tmowMax, value); }
        }

        private ObservableCollection<int> endChannels = new ObservableCollection<int>() { 1 };
        /// <summary>
        /// 测试结束端口
        /// </summary>
        public ObservableCollection<int> EndChannels
        {
            get { return endChannels; }
            set { SetProperty(ref endChannels, value); }
        }
        private int endChannel = 1;
        /// <summary>
        /// 测试结束端口
        /// </summary>
        public int EndChannel
        {
            get { return endChannel; }
            set { SetProperty(ref endChannel, value); }
        }
    }
}
